//
//  XDLMSanPostFiveTableViewCell.m
//  xindailianmeng
//
//  Created by 于于 on 17/2/22.
//  Copyright © 2017年 xindailianmeng.cn. All rights reserved.
//

#import "XDLMSanPostFiveTableViewCell.h"
#define TCOLOR [UIColor colorWithRed:187.0/255.0 green:147.0/255.0 blue:115.0/255.0 alpha:1]
#define TEXTCOLOR [UIColor colorWithRed:153.0/255.0 green:153.0/255.0 blue:153.0/255.0 alpha:1]
@implementation XDLMSanPostFiveTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setUI];
    }
    return self;
}
-(void)setUI
{
    _borrowImg = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"repay"]];
    _borrowImg.frame = CGRectMake(15, 8.5*kscale, 10*kscale, 10*kscale);
    [self addSubview:_borrowImg];
    
    
    _titleOneLab = [self createLabelWithFrame:CGRectMake(29*kscale, 7*kscale, 200, 16*kscale) text:@"借款用途" textFont:[UIFont systemFontOfSize:14] textColor:[UIColor blackColor]];
    _titleOneLab.textAlignment = NSTextAlignmentLeft;
    [self addSubview:_titleOneLab];
    
    _brInfolab = [self createLabelWithFrame:CGRectMake(15, 32*kscale, kScreenW - 30, 30*kscale) text:@"本次蛇偶家东方骄傲骄傲的搜房加到房间打扫房间的搜附近打扫及的覅偶按实际发生" textFont:[UIFont systemFontOfSize:12] textColor:TEXTCOLOR];
    _brInfolab.textAlignment = NSTextAlignmentLeft;
    _brInfolab.numberOfLines = 0;
    //    [self changeSpaceForLabel:brInfolab withLineSpace:5 WordSpace:0.5];
    [self addSubview:_brInfolab];
    
}
-(void)setTitle:(NSString *)title text:(NSString *)text
{
    [_titleOneLab setText:title];
    [_brInfolab setText:text];
    [_brInfolab sizeToFit];
    
}
//创建lab
- (UILabel *)createLabelWithFrame:(CGRect)frame text:(NSString *)text textFont:(UIFont *)font textColor:(UIColor *)color {
    
    UILabel * label = [[UILabel alloc] initWithFrame:frame];
    label.text = text;
    label.textColor = color;
    label.font = font;
    label.adjustsFontSizeToFitWidth = YES;
    label.textAlignment = NSTextAlignmentCenter;
    
    return label;
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
